def reverse(data):
    for index in range(len(data)-1, -1, -1):
        yield data[index]

arr = reverse('golf')
print(arr)  # Output: <generator object reverse at 0x0000025BE5110100>
for char in arr:
    print(char)

page = [
    '<div>test </div>',
    '<ul><li>he llo</li><li>world</li></ul>',
    '<script>ale rt("Hello, World!");</script>'
]

valedict = list(word for line in page for word in line.split())
print(valedict)